from pymysql import Connection
conn = Connection(
    host = '127.0.0.1',
    user = 'root',
    passwd = '123456',
    port = 3306,
    autocommit = True   # 自动提交事务
)
cursor = conn.cursor()
conn.select_db("test")
cursor.execute("insert into sb_list values(10001,'sbsbs')")
#conn.commit()   # 确认执行操作
res = cursor.fetchall()
for x in res:
    print(x)